package leetcode.code163.MissingRanges;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class MissingRanges implements IDebug {

	@Override
	public void debug1() {
//输入: nums = [0, 1, 3, 50, 75], lower = 0 和 upper = 99,
//输出: ["2", "4->49", "51->74", "76->99"]
		int[] nums = new int[] { 0, 1, 3, 50, 75 };
		int lower = 0;
		int upper = 99;
		List<String> result = findMissingRanges(nums, lower, upper);
		HelpDebug.printInputs("[\"2\", \"4->49\", \"51->74\", \"76->99\"]", new Object[] { nums, lower, upper });
		HelpDebug.printObject(result);
	}

	@Override
	public void debug2() {
		int[] nums = new int[] {};
		int lower = 1;
		int upper = 1;
		List<String> result = findMissingRanges(nums, lower, upper);
		HelpDebug.printInputs("[\"1\"]", new Object[] { nums, lower, upper });
		HelpDebug.printObject(result);

	}

	@Override
	public void debug3() {
		int[] nums = new int[] { -1 };
		int lower = -1;
		int upper = -1;
		List<String> result = findMissingRanges(nums, lower, upper);
		HelpDebug.printInputs("[]", new Object[] { nums, lower, upper });
		HelpDebug.printObject(result);

	}

	@Override
	public void debug4() {
		int[] nums = new int[] { -1 };
		int lower = -2;
		int upper = -1;
		List<String> result = findMissingRanges(nums, lower, upper);
		HelpDebug.printInputs("[\"-2\"]", new Object[] { nums, lower, upper });
		HelpDebug.printObject(result);

	}

	abstract public List<String> findMissingRanges(int[] nums, int lower, int upper);
}
